<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<script src="./lib/axios.min.js"></script>
</head>
<body>
<button>获取数据</button>
<div id="app"></div>
</body>
<script>
	const btn = document.querySelector("button");
	const app = document.querySelector("#app");
	btn.onclick = function () {
		// http://127.0.0.1:8090/
		axios.get("/movieList").then(value => {
			app.innerHTML = value.data.hot.map(item => `
				<div>
					<img height="200" src="${item.img}" alt="">
					<p>《${item.nm}》</p>
					<hr/>
				</div>
			
			`).join("")
			
			
			// value.data.hot.forEach(item=>{
			// 	app.innerHTML += `
			// 		<div>
			// 			<img height="200" src="${item.img}" alt="">
			// 			<p>《${item.nm}》</p>
			// 			<hr/>
			// 		</div>
			// 	`
			// });
		})
	}
</script>
</html>